$OpenBSD: patch-CMakeLists_txt,v 1.1 2014/03/27 04:00:25 bentley Exp $

Don't set -O2 or -O3.

--- CMakeLists.txt.orig	Fri Oct 26 13:55:24 2012
+++ CMakeLists.txt	Fri Oct 26 13:57:13 2012
@@ -218,14 +218,7 @@ EXEC_PROGRAM (
     OUTPUT_VARIABLE WLBUILD_COMPILERVERSION
     )
     STRING(REGEX REPLACE ".*(4)\\.(5)\\.([0-9]).*" "\\1.\\2.\\3" WLBUILD_COMPILERVERSION_REP ${WLBUILD_COMPILERVERSION})
-    IF (WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.1" OR WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.2")
-        message("Detected gcc ${WLBUILD_COMPILERVERSION_REP}")
-        message("Suffering from gcc bug, disabling -O3")
-        set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
-    ELSE (WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.1" OR WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.2")
-        #This line is the default and should be preserved.
-        set (CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
-    ENDIF (WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.1" OR WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.2")
+    set (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
 ENDIF (${CMAKE_COMPILER_IS_GNUCXX})
 
 #If building with MSVC, then check for 3rdparty libs
